package com.eric.flowabledemo.strategy.impl;

import com.eric.flowabledemo.constant.ResponseCodeEnum;
import com.eric.flowabledemo.constant.RmaStatusEnum;
import com.eric.flowabledemo.model.request.ProcessRequestData;
import com.eric.flowabledemo.model.response.ResponseResult;
import com.eric.flowabledemo.strategy.AbstractRmaProcessStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class RepairRmaProcessStrategy extends AbstractRmaProcessStrategy {
    private static final Logger LOGGER = LoggerFactory.getLogger(RepairRmaProcessStrategy.class);

    @Override
    public RmaStatusEnum status() {
        return RmaStatusEnum.REPAIR;
    }

    @Override
    public ResponseResult validate(ProcessRequestData requestData) {
        LOGGER.info("校验从REPAIR到下一个状态所需要的条件");
        return new ResponseResult(ResponseCodeEnum.SUCCESS);
    }
}
